package com.internetCafes.spms.web.customer.mapper.customer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.internetCafes.spms.web.customer.entity.customer.CustomerCooperation;
import com.internetCafes.spms.web.customer.model.customer.cooperation.CustomerCooperationDo;
import com.internetCafes.spms.web.customer.model.customer.cooperation.CustomerCooperationPagingDo;
import com.internetCafes.spms.web.customer.model.customer.cooperation.CustomerCooperationPagingPo;
import com.internetCafes.spms.web.customer.model.customer.cooperation.CustomerCooperationPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 客户合作表 Mapper 接口
 * </p>
 *
 * @author Zj
 * @since 2021-10-20
 */
@Mapper
public interface CustomerCooperationMapper extends BaseMapper<CustomerCooperation> {

    /**
     * 合作记录统计
     *
     * @param cooperationDo 合作记录请求参数
     * @return 合作记录列表
     */
    List<CustomerCooperationPo> countCooperation(@Param("cooperationDo") CustomerCooperationDo cooperationDo);

    /**
     * 合作记录分页
     *
     * @param page     分页参数
     * @param pagingDo 分页自定义检索条件
     * @return 分页数据
     */
    Page<CustomerCooperationPagingPo> paging(Page<CustomerCooperation> page, @Param("customerPagingDo") CustomerCooperationPagingDo pagingDo);
}
